home *** CD-ROM | disk | FTP | other *** search
- /* $VER: R02EchoConv 1.1 (23.03.96)
-
- by Johan Billing
-
- This ARexx script is probably only of interest to Swedish users. The script
- converts the R20_ECHO.LST file to a format that can be used for AreaFix
- forward-requests and auto-adding of descriptions. It is a good idea to
- convert the file from PC8 to Latin-1 using a program such as CharConv
- before running this script.
-
- Syntax: rx R20EchoConv.rexx <R20_ECHO.LST> <output file>
-
- History:
-
- 1.0 First version
-
- 1.1 The version of the R20_ECHO list changed a bit, so I had to
- change this script too. The field in the list that was called
- NAME before is now called TAG...
-
- */
-
- parse arg echoname" "outname
-
- IF ~SHOW(Libraries,'rexxsupport.library') THEN
- IF ~ADDLIB("rexxsupport.library",0,-30,0) THEN EXIT
-
- call open('echofile',echoname,'R')
- call open('outfile',outname,'W')
-
- tagname=""
- desc=""
-
- do while ~eof('echofile')
- inline=readln('echofile')
- inline=strip(inline,'T','0d'x)
-
- if pos(' : ',inline)~=0 then do
- parse var inline field ':' contents
- field=strip(field,'B')
- contents=strip(contents,'B')
-
- if field="TAG" then do
- if tagname~="" then do
- tagname=overlay(tagname,"",1,max(30,length(tagname)))
- call writeln('outfile',tagname desc)
- end
- tagname=contents
- end
- if field="TITEL" then desc=contents
- end
- end
-
- if tagname~="" then do
- tagname=overlay(tagname,"",1,max(30,length(tagname)))
- call writeln('outfile',tagname desc)
- end
-
- call close('echofile')
- call close('outfile')
-
-